<?php

namespace Glpmr\UserBundle\Entity;

use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;

/**
 * User
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class User extends BaseUser {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @var string
     *
     * @ORM\OnetoOne(targetEntity="Glpmr\QuizzBundle\Entity\Promotion", cascade={"persist"})
     * @ORM\JoinColumn(nullable=false)
     */
    private $promotion;

    /**
     * Set promotion
     *
     * @param \Glpmr\QuizzBundle\Entity\Promotion $promotion
     * 
     */
    public function setPromotion(\Glpmr\QuizzBundle\Entity\Promotion $promotion = null) {
        $this->promotion = $promotion;

        return $this;
    }

    /**
     * Get promotion
     *
     * @return Glpmr\QuizzBundle\Entity\Promotion 
     */
    public function getPromotion() {
        return $this->promotion;
    }

}
